<div class="modal fade in ip-box ztree-fa" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"
  id="roleLimitTree">
  <div class="modal-dialog modal-lg modal-dialog-centered" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h4 class="modal-title" id="myModalLabel">角色功能授权页面</h4>
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
      </div>
      <div class="modal-body">
        <div class="btn-group">
          <button class="btn btn-default" mat-raised-button id="ztreeExpandAll" (click)="ztreeExpand(true)">全部展开</button>
          <button class="btn btn-default" mat-raised-button id="ztreeUnExpandAll" (click)="ztreeExpand(false)">全部收缩</button>
          <a style="cursor:pointer" id="checkAll" (click)="checkAll(true)">全选</a>
          <a style="cursor:pointer" id="unCheckAll" (click)="checkAll(false)">反选</a>
          <a style="cursor:pointer" id="clearAll" (click)="clearAll()">清空</a>
          <!-- <div class="input-group pull-right search-width">
            <input type="text" class="form-control search-input" (change)="search()" [(ngModel)]="query" placeholder="请输入关键词搜索">
            <span class="input-group-addon search-btn" (click)="search()">
              <img src="assets/right-product/search.png">检索
            </span>
          </div> -->
        </div>
        <div id="ztreeList" id="tree-container">
          <p-tree [value]="treeData" >
            <ng-template let-node pTemplate="default">
              <!-- <input [(ngModel)]="node.label" type="text" style="width:100%"> -->
                <span [class.search]="!isEmpty(hiddenNodeIds)&&!hiddenNodeIds[node.id]" class="tree-label" (dblclick)="dblClick()">{{ node.label }}</span>
                <span class="tree-label-right animate-time" *ngFor="let item of bubbleSortByOperation(node.permissionListes)">
                  <mat-checkbox type="checkbox" 
                    class="treeinput" 
                    name="{{item.id}}:{{node.id}}" 
                    (ngModelChange)="clickCheckBox($event,item)" 
                    [(ngModel)]="formData[item.formDataName]">
                    {{item.name}}
                  </mat-checkbox>
                  
                </span>
            </ng-template>
          </p-tree>

        </div>

        <div class="modal-footer">
          <button type="button" class="btn btn-default" mat-raised-button data-dismiss="modal">取消</button>
          <button type="button" mat-button id="myButton" class="btn btn-primary" (click)="submit()">
              <span class="glyphicon glyphicon-ok"></span> 保存</button>
          <!-- <button type="button" (click)="test()">test</button> -->
        </div>
      </div>
    </div>
  </div>
